const { spawn } = require('child_process');
const cppCudaProgram = spawn('./cpp_cuda_program');

cppCudaProgram.stdout.on('data', (data) => {
    console.log(`Received from C++/CUDA: ${data}`);
});

cppCudaProgram.stderr.on('data', (data) => {
    console.error(`stderr: ${data}`);
});

cppCudaProgram.on('close', (code) => {
    console.log(`C++/CUDA program exited with code ${code}`);
});
